<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        #d1{
            width: 200px;
            height: 200px;
            border:10px dotted red;
            border-bottom: 10px solid green;
            border-radius: 200px;
        }
        #d3{
            width: 20px;
            height: 20px;
            background-color: black;
            border-radius: 20px;
            margin: 30px;
        }
        #d4{
            width: 20px;
            height: 20px;
            background-color: black;
            border-radius: 20px;
            margin: 1px 0 0 170px;
        }
        #d2{
            width: 100px;
            height: 100px;
            border: 1px solid blue;
            /*给元素添加内边距，默认会影响元素的宽高*/
            padding-left: 50px;
            padding-top: 50px;
            /*添加这个样式后，内边距和边框则不会在影响宽高*/
            box-sizing: border-box;
        }
    </style>
</head>
<body>
<div id="d2">
    内边距
</div>
<div id="d1">边框
    <div id="d3"></div>
    <div id="d4"></div>
</div>
</body>
</html>